1. Field of the Invention
The present invention relates to encoding and decoding techniques of an image.
2. Description of the Related Art
As a technique for compressing a multi-valued image including characters, line arts, and a natural image, Japanese Patent Laid-Open No. 4-326669 is known. As described in this reference, an inputted image is divided into blocks each as a unit of orthogonal transformation, a pixel which has a mode value that has a highest probability of occurrence in each block is assumed as that of a character or line arts, and pixel data of color information or density information of the mode value is extracted. The color of the mode value and information used to identify an extracted pixel and non-extracted pixels then undergo lossless encoding such as runlength encoding or the like. Also, the average value of non-extracted pixels in each block is calculated, and the value of the extracted pixel is substituted by the calculated average value, thus attaining lossy encoding such as JPEG or the like. Then, the lossless encoding result and lossy encoding result are combined and outputted.
As another technique for compressing a multi-valued image including characters, line arts, and a natural image, Japanese Patent Laid-Open No. 10-108025 or the like is known.
However, since the related art uses predictive encoding or variable-length encoding as encoding, encoded data can only be decoded in the same order as that upon encoding, and it is very difficult to attain manipulations such as random access and rotation processing for respective blocks. Alternatively, a manipulation for making data fall within a predetermined code size is complicated.